﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace bloqueo_teclasEspeciales
{
   public  class FrameManager
    {
        private frmViewCliente formularioblok = null;

        private frmViewCliente FormInstance
        {
            get
            {
                if (formularioblok == null)
                {
                    formularioblok = new frmViewCliente("");
                    formularioblok.Disposed += new EventHandler(form_Disposed);
                }
                return formularioblok;
            }
        }

        void form_Disposed(object sender, EventArgs e)
        {
            formularioblok = null;
        }

        public void mostrarFormulario()
        {
            frmViewCliente formu = this.FormInstance;
            formu.Show();
            formu.BringToFront();
        }

        public void cerrarFormulario()
        {
            frmViewCliente formu = this.FormInstance;
            formu.BringToFront();
            formu.Close();

        }

    }
}
